<?php

namespace App\Api\Response;

class CodeStatus
{
    public static function msg($code)
    {
        $maps = static::getCodeText();
        return isset($maps[$code]) ? $maps[$code] : '未知错误';
    }

    public static function getCodeText()
    {
        return [
            '200' => 'success！',
            '201' => '注册成功！',
            '202' => '保存成功！',
            '203' => '修改成功！',
            '205' => '删除成功！',

            '500' => '服务器错误',
            '302' => '测试',

            '601' => '找不到ID',

            '700' => '请求失败！',
            '701' => '注册失败！',
            '702' => 'Token获取失败！',


        ];
    }

}
